CAD systems produce drawings such as design drawings on the screen of a graphic display using basic figure elements including straight lines, circles, and arcs, and also free curves such as spline curves. In designing products or decorative patterns, it is commonly practiced to round a corner composed of two figure elements or draw a circle positioned between and tangential to two figure elements, and there is available a function to draw tangential circles or rounded corners with ease.
On a two-dimensional CAD system, a corner of a rectangle can be rounded by executing a command which produces a round having a radius "r" between two figure elements. This is because if the figure to be processed is a rectangle, then the center of curvature of an arc can simply be determined by calculating the length of the radius "r" from the joint between two successive figure elements. In rectangles, therefore, rounded corners or circles tangential to two sides can easily and accurately be calculated geometrically and algebraically.
If at least one of the figure elements is a free curve which is normally called a spline or Bezier curve or an ellipse, then it is not easy to round a corner or generate a tangential circle with respect to those figure elements because the center of a tangential circle cannot be determined geometrically.
FIGS. 1(A) and 1(B) of the accompanying drawings show a tangential circle and a rounded corner, respectively, with .respect to two figure elements at least one of which is a free curve. Specifically, FIG. 1(A) illustrates two figure elements S.sub.1, S.sub.2 which are spline curves and a circle C.sub.1 having a radius "r" which is tangential to these spline curves, and FIG. 1(B) illustrates a rounded corner composed of an arc C.sub.2 having a radius "r" of curvature which is positioned at a point of intersection between a straight line L and a figure element S.sub.3 which is a spline curve. Generally, a convergent calculation method is employed in the generation of such a tangential circle and a rounded corner.
The convergent calculation method is a method of solution that is relied upon when no analytic solution is available. According to the convergent calculation method, a mathematical formula is produced with the condition of being tangential used as an undetermined variable, and the undetermined variable is varied, starting from a suitable initial value, until the formula converges into a final desirable solution. For example, if a figure element is a spline curve which is formed by smoothly joining a plurality of points, then since the spline curve necessarily has a start point and an end point, the start point is used as an initial value, and solutions are successively determined from the initial value. In this manner, the solutions are successively converged, searching for a region where the spline curve and a circle having a radius "r" are tangential to each other. When the region is found, the tangential circle can then be drawn by determining the center of the circle and the point where the circle is tangential to the spline curve. If a rounded corner is to be generated, then since the point of intersection between the spline curve and the tangential circle has been determined, it is similarly possible to generate and display an arc.
However, inasmuch as the undetermined variable is varied, starting from a suitable initial value, until the formula converges into a final desirable solution according to the convergent calculation method, a tangential circle may not necessarily be generated in a position intended by the operator, depending on what value is employed as the initial value.
FIG. 2 of the accompanying drawings shows tangential circles which can possibly be generated actually when a circle is to be generated tangentially to two spline curves. If there are two spline curves S.sub.1, S.sub.2 and convergent calculations are carried out from a start point remote from a point of intersection between these spline curves S.sub.1, S.sub.2 to determine a tangential circle C.sub.A, then a tangential circle C.sub.B, C.sub.C, or C.sub.D may possibly be determined. Generally, an initial value is established in a position to easily determine the desired tangential circle C.sub.A. Actually, however, if curves are complex, then a large jump may occur as the convergent calculations converge between the curves, and it is not assured that the desired tangential circle C.sub.A will necessarily be determined among the four tangential circles C.sub.A, C.sub.B, C.sub.C, C.sub.D. In some cases, the convergent calculations do not converge, but diverges or oscillates, failing to arrive at any solution.
With the conventional processes of generating a circle tangential to two free curves, as described above, a tangential circle may not necessarily be generated in a position intended by the operator, and no tangential circle may be generated at all when the convergent calculations diverge or oscillate. Consequently, the conventional processes have suffered a stability problem in the generation of a tangential circle. For this reason, it has always remained to be determined where to start converging the convergent calculations, i.e., what initial value is to be employed to start the convergent calculations, and various attempts have been made to solve the problems.